<template>
  <div class="admin-dashboard">
    <!-- 侧边栏 -->
    <div class="sidebar">
      <div class="sidebar-header">
        <div class="admin-logo">
          <div class="admin-logo-icon">管</div>
          <div class="admin-logo-text">管理系统</div>
        </div>
      </div>
      
      <div class="sidebar-menu">
        <div 
          v-for="menu in menuList" 
          :key="menu.name"
          class="menu-item"
          :class="{ active: currentMenu === menu.name }"
          @click="handleMenuClick(menu)"
        >
          <div class="menu-icon">{{ menu.icon }}</div>
          <span>{{ menu.label }}</span>
        </div>
      </div>
      
      <div class="sidebar-footer">
        <div class="admin-avatar-container">
          <div class="admin-avatar">{{ adminInitial }}</div>
          <div class="admin-info">
            <div class="admin-name">{{ adminName }}</div>
            <div class="admin-role">超级管理员</div>
          </div>
        </div>
        
        <!-- 退出登录按钮 -->
        <div class="logout-btn" @click="handleLogout">
          <div class="logout-icon">🚪</div>
          <span>退出登录</span>
        </div>
      </div>
    </div>
    
    <!-- 主内容区域 -->
    <div class="main-content">
      <!-- 顶部导航 -->
      <div class="top-nav">
        <h1 class="page-title">
          <div class="page-title-icon">📊</div>
          数据看板
        </h1>
        
        <div class="top-actions">
          <el-button class="action-btn refresh-btn" @click="handleRefresh">
            <span class="btn-icon">🔄</span>
            刷新数据
          </el-button>
          <el-button class="action-btn logout-btn" @click="handleLogout">
            <span class="btn-icon">🚪</span>
            退出登录
          </el-button>
        </div>
      </div>
      
      <!-- 统计卡片区域 -->
      <div class="stats-cards">
        <div 
          v-for="stat in statsData" 
          :key="stat.title"
          class="stat-card"
          :style="{ background: stat.gradient }"
        >
          <div class="stat-icon">{{ stat.icon }}</div>
          <div class="stat-content">
            <div class="stat-value">{{ stat.value }}</div>
            <div class="stat-title">{{ stat.title }}</div>
            <div class="stat-trend" :class="stat.trendClass">
              <span>{{ stat.trend }}</span>
              <span>{{ stat.trendText }}</span>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 图表区域 -->
      <div class="charts-section">
        <div class="chart-card">
          <div class="chart-header">
            <h3>福利发放趋势</h3>
            <el-radio-group v-model="timeRange" size="small">
              <el-radio-button label="week">近7天</el-radio-button>
              <el-radio-button label="month">近30天</el-radio-button>
              <el-radio-button label="year">近一年</el-radio-button>
            </el-radio-group>
          </div>
          <div ref="trendChartRef" class="chart-container"></div>
        </div>
        
        <div class="chart-card">
          <div class="chart-header">
            <h3>商品分类销售占比</h3>
          </div>
          <div ref="pieChartRef" class="chart-container"></div>
        </div>
      </div>
      
      <!-- 快捷操作和活动日志 -->
      <div class="bottom-section">
        <!-- 快捷操作 -->
        <div class="quick-actions-card">
          <h3 class="card-title">快捷操作</h3>
          <div class="quick-actions-grid">
            <div 
              v-for="action in quickActions" 
              :key="action.name"
              class="action-item"
              @click="handleQuickAction(action)"
            >
              <div class="action-icon" :style="{ background: action.color }">
                {{ action.icon }}
              </div>
              <div class="action-label">{{ action.label }}</div>
            </div>
          </div>
        </div>
        
        <!-- 最近活动 -->
        <div class="activity-card">
          <h3 class="card-title">最近活动</h3>
          <div class="activity-list">
            <div 
              v-for="(activity, index) in recentActivities" 
              :key="index"
              class="activity-item"
            >
              <div class="activity-dot" :style="{ background: activity.color }"></div>
              <div class="activity-content">
                <div class="activity-text">{{ activity.text }}</div>
                <div class="activity-time">{{ activity.time }}</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 热门商品排行 -->
      <div class="ranking-section">
        <h3 class="card-title">热门商品TOP 10</h3>
        <div class="ranking-table">
          <div class="ranking-header">
            <div class="rank-col">排名</div>
            <div class="name-col">商品名称</div>
            <div class="sales-col">销量</div>
            <div class="amount-col">销售额</div>
          </div>
          <div 
            v-for="(item, index) in topProducts" 
            :key="index"
            class="ranking-row"
          >
            <div class="rank-col">
              <div class="rank-badge" :class="'rank-' + (index + 1)">
                {{ index + 1 }}
              </div>
            </div>
            <div class="name-col">
              <div class="product-info">
                <div class="product-name">{{ item.name }}</div>
                <div class="product-category">{{ item.category }}</div>
              </div>
            </div>
            <div class="sales-col">{{ item.sales }}</div>
            <div class="amount-col">¥{{ item.amount }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, computed } from 'vue'
import { useRouter } from 'vue-router'
import { useUserStore } from '@/stores/user'
import { ElMessage } from 'element-plus'
import * as echarts from 'echarts'

const router = useRouter()
const userStore = useUserStore()

// 当前菜单
const currentMenu = ref('dashboard')

// 时间范围
const timeRange = ref('week')

// 图表引用
const trendChartRef = ref(null)
const pieChartRef = ref(null)

// 管理员信息
const adminName = computed(() => userStore.userInfo?.realName || '系统管理员')
const adminInitial = computed(() => adminName.value.charAt(0))

// 菜单列表
const menuList = [
  { name: 'dashboard', label: '数据看板', icon: '📊', path: '/admin/dashboard' },
  { name: 'employee', label: '员工管理', icon: '👥', path: '/admin/employee' },
  { name: 'card', label: '福利卡管理', icon: '🎁', path: '/admin/welfare-card' },
  { name: 'product', label: '商品管理', icon: '🛒', path: '/admin/product' },
  { name: 'order', label: '订单管理', icon: '📦', path: '/admin/order' },
  { name: 'statistics', label: '数据统计', icon: '📈', path: '/admin/statistics' }
]

// 统计数据（模拟数据）
const statsData = [
  {
    icon: '👥',
    title: '员工总数',
    value: '248',
    trend: '↑ 12',
    trendText: '较上月',
    trendClass: 'trend-up',
    gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'
  },
  {
    icon: '🎁',
    title: '发放总额',
    value: '¥186,500',
    trend: '↑ 8.5%',
    trendText: '较上月',
    trendClass: 'trend-up',
    gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)'
  },
  {
    icon: '📦',
    title: '订单总数',
    value: '1,234',
    trend: '↑ 15.3%',
    trendText: '较上月',
    trendClass: 'trend-up',
    gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)'
  },
  {
    icon: '💰',
    title: '兑换率',
    value: '87.6%',
    trend: '↑ 2.1%',
    trendText: '较上月',
    trendClass: 'trend-up',
    gradient: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)'
  }
]

// 快捷操作
const quickActions = [
  { name: 'addEmployee', label: '添加员工', icon: '➕', color: '#409EFF' },
  { name: 'generateCard', label: '生成福利卡', icon: '🎁', color: '#67C23A' },
  { name: 'addProduct', label: '添加商品', icon: '🛒', color: '#E6A23C' },
  { name: 'viewOrders', label: '查看订单', icon: '📦', color: '#F56C6C' },
  { name: 'exportData', label: '导出数据', icon: '📊', color: '#909399' },
  { name: 'systemSettings', label: '系统设置', icon: '⚙️', color: '#606266' }
]

// 最近活动（模拟数据）
const recentActivities = [
  { text: '员工"张三"兑换了价值500元的福利卡', time: '5分钟前', color: '#67C23A' },
  { text: '管理员"李管理"添加了10个新商品', time: '15分钟前', color: '#409EFF' },
  { text: '系统生成了100张福利卡（批次号：B20231022）', time: '1小时前', color: '#E6A23C' },
  { text: '员工"王五"完成订单支付，金额：128元', time: '2小时前', color: '#67C23A' },
  { text: '管理员"赵管理"导出了本月数据报表', time: '3小时前', color: '#909399' },
  { text: '员工"钱七"注册了新账号', time: '5小时前', color: '#409EFF' }
]

// 热门商品排行（模拟数据）
const topProducts = [
  { name: '心相印抽纸30包', category: '日用百货', sales: 678, amount: '26,368' },
  { name: '三只松鼠坚果大礼包', category: '食品生鲜', sales: 567, amount: '50,463' },
  { name: '维达卷纸12卷', category: '日用百货', sales: 534, amount: '15,966' },
  { name: '蓝月亮洗衣液3kg', category: '日用百货', sales: 523, amount: '22,384' },
  { name: '百草味零食组合装', category: '食品生鲜', sales: 489, amount: '38,142' },
  { name: '舒肤佳抑菌香皂5块装', category: '日用百货', sales: 456, amount: '9,074' },
  { name: '小米移动电源20000mAh', category: '数码办公', sales: 456, amount: '45,144' },
  { name: '晨光中性笔20支', category: '数码办公', sales: 445, amount: '9,790' },
  { name: '农夫山泉饮用水24瓶', category: '食品生鲜', sales: 434, amount: '16,492' },
  { name: '金龙鱼大米5kg', category: '食品生鲜', sales: 423, amount: '20,304' }
]

// 菜单点击
const handleMenuClick = (menu) => {
  currentMenu.value = menu.name
  if (menu.path) {
    router.push(menu.path)
  }
}

// 快捷操作
const handleQuickAction = (action) => {
  ElMessage.success(`执行操作：${action.label}`)
}

// 刷新数据
const handleRefresh = () => {
  ElMessage.success('数据已刷新')
}

// 退出登录
const handleLogout = async () => {
  try {
    await userStore.logout()
    ElMessage.success('已退出登录')
    router.push('/login')
  } catch (error) {
    console.error('退出登录失败:', error)
    ElMessage.error('退出登录失败')
  }
}

// 初始化趋势图表
const initTrendChart = () => {
  if (!trendChartRef.value) return
  
  const chart = echarts.init(trendChartRef.value)
  const option = {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      }
    },
    legend: {
      data: ['福利发放', '员工兑换']
    },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    xAxis: {
      type: 'category',
      data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        name: '福利发放',
        type: 'bar',
        data: [32000, 28000, 35000, 30000, 38000, 25000, 29000],
        itemStyle: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: '#83bff6' },
            { offset: 1, color: '#188df0' }
          ])
        }
      },
      {
        name: '员工兑换',
        type: 'bar',
        data: [28000, 25000, 32000, 27000, 35000, 22000, 26000],
        itemStyle: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: '#fbc687' },
            { offset: 1, color: '#f97d7d' }
          ])
        }
      }
    ]
  }
  
  chart.setOption(option)
  
  // 响应式
  window.addEventListener('resize', () => {
    chart.resize()
  })
}

// 初始化饼图
const initPieChart = () => {
  if (!pieChartRef.value) return
  
  const chart = echarts.init(pieChartRef.value)
  const option = {
    tooltip: {
      trigger: 'item',
      formatter: '{a} <br/>{b}: {c} ({d}%)'
    },
    legend: {
      orient: 'vertical',
      right: 10,
      top: 'center'
    },
    series: [
      {
        name: '销售占比',
        type: 'pie',
        radius: ['40%', '70%'],
        avoidLabelOverlap: false,
        itemStyle: {
          borderRadius: 10,
          borderColor: '#fff',
          borderWidth: 2
        },
        label: {
          show: false,
          position: 'center'
        },
        emphasis: {
          label: {
            show: true,
            fontSize: 20,
            fontWeight: 'bold'
          }
        },
        labelLine: {
          show: false
        },
        data: [
          { value: 35, name: '日用百货', itemStyle: { color: '#5470c6' } },
          { value: 28, name: '食品生鲜', itemStyle: { color: '#91cc75' } },
          { value: 18, name: '数码办公', itemStyle: { color: '#fac858' } },
          { value: 12, name: '图书文创', itemStyle: { color: '#ee6666' } },
          { value: 7, name: '运动健康', itemStyle: { color: '#73c0de' } }
        ]
      }
    ]
  }
  
  chart.setOption(option)
  
  // 响应式
  window.addEventListener('resize', () => {
    chart.resize()
  })
}

// 组件挂载时初始化图表
onMounted(() => {
  initTrendChart()
  initPieChart()
})
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.admin-dashboard {
  display: flex;
  min-height: 100vh;
  background-color: #f5f7fa;
}

/* 侧边栏 */
.sidebar {
  width: 220px;
  background-color: white;
  height: 100vh;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.admin-logo {
  display: flex;
  align-items: center;
}

.admin-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f56c6c 0%, #f78989 100%);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.admin-logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #f56c6c;
}

.sidebar-menu {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.menu-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s;
  
  &:hover {
    background-color: #f5f7fa;
  }
  
  &.active {
    background-color: #fef0f0;
    color: #f56c6c;
    border-right: 3px solid #f56c6c;
  }
}

.menu-icon {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-avatar-container {
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f56c6c;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  margin-right: 10px;
}

.admin-info {
  flex: 1;
}

.admin-name {
  font-weight: 500;
  font-size: 14px;
}

.admin-role {
  color: #909399;
  font-size: 12px;
}

/* 退出登录按钮 */
.logout-btn {
  width: 100%;
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(239, 83, 80, 0.3);
}

.logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 83, 80, 0.4);
}

.logout-icon {
  font-size: 14px;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 20px;
}

/* 顶部导航 */
.top-nav {
  background-color: white;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  margin: 0;
}

.page-title-icon {
  width: 32px;
  height: 32px;
  background-color: #f56c6c;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  color: white;
}

.top-actions {
  display: flex;
  gap: 10px;
}

/* 统计卡片 */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  color: white;
}

.stat-icon {
  font-size: 48px;
  margin-right: 15px;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-title {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 5px;
}

.stat-trend {
  font-size: 12px;
  opacity: 0.8;
  
  &.trend-up {
    color: #fff;
  }
  
  &.trend-down {
    color: #fdd;
  }
}

/* 图表区域 */
.charts-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  
  h3 {
    margin: 0;
    font-size: 16px;
    color: #303133;
  }
}

.chart-container {
  width: 100%;
  height: 300px;
}

/* 底部区域 */
.bottom-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.quick-actions-card,
.activity-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-title {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #303133;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  
  &:hover {
    background-color: #f5f7fa;
    transform: translateY(-2px);
  }
}

.action-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: white;
  margin-bottom: 10px;
}

.action-label {
  font-size: 14px;
  color: #606266;
}

/* 活动列表 */
.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  
  &:last-child {
    border-bottom: none;
  }
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  margin-right: 12px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  color: #303133;
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: #909399;
}

/* 排行榜区域 */
.ranking-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ranking-table {
  margin-top: 20px;
}

.ranking-header {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px;
  padding: 12px 0;
  border-bottom: 2px solid #f0f0f0;
  font-weight: 500;
  color: #606266;
}

.ranking-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  
  &:hover {
    background-color: #f5f7fa;
  }
}

.rank-col {
  text-align: center;
}

.rank-badge {
  display: inline-flex;
  width: 30px;
  height: 30px;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  font-weight: bold;
  color: white;
  background-color: #909399;
  
  &.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  }
  
  &.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
  }
  
  &.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
  }
}

.name-col {
  padding-left: 15px;
}

.product-info {
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 14px;
  color: #303133;
  margin-bottom: 4px;
}

.product-category {
  font-size: 12px;
  color: #909399;
}

.sales-col,
.amount-col {
  text-align: right;
  padding-right: 15px;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1400px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .charts-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .bottom-section {
    grid-template-columns: 1fr;
  }
  
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    
    .admin-logo-text,
    .menu-item span,
    .admin-info {
      display: none;
    }
  }
  
  .main-content {
    margin-left: 60px;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .ranking-header,
  .ranking-row {
    grid-template-columns: 60px 1fr 80px;
  }
  
  .amount-col {
    display: none;
  }
}

/* ========================================
   按钮美化 - 暖色调主题
   ======================================== */

/* 顶部操作按钮 */
.action-btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  
  .btn-icon {
    font-size: 16px;
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  &:active {
    transform: translateY(0);
  }
}

.refresh-btn {
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
  color: white;
  
  &:hover {
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  }
}

.logout-btn {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  color: white;
  
  &:hover {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  }
}

/* Logo 和标题图标优化 - 暖色调 */
.admin-logo-icon,
.page-title-icon {
  background: linear-gradient(135deg, #ff7043 0%, #ff5722 100%);
  box-shadow: 0 2px 8px rgba(255, 112, 67, 0.3);
}

.admin-logo-text {
  color: #ff5722;
}

/* 侧边栏菜单激活状态 - 暖色调 */
.menu-item.active {
  background: linear-gradient(90deg, rgba(255, 112, 67, 0.08) 0%, rgba(255, 112, 67, 0.15) 100%);
  color: #ff5722;
  border-right: 3px solid #ff5722;
}

/* 管理员头像 - 暖色调 */
.admin-avatar {
  background: linear-gradient(135deg, #ff7043 0%, #ff5722 100%);
  box-shadow: 0 2px 6px rgba(255, 112, 67, 0.3);
}

/* 统计卡片图标优化 */
.stat-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 响应式优化 */
@media (max-width: 768px) {
  .action-btn {
    padding: 8px 16px;
    font-size: 13px;
    
    .btn-icon {
      font-size: 13px;
    }
  }
}
</style>
